import request from '@/utils/request'
import qs from "qs";

export default {
  //查询院系
  getPageDepartmentList(pagination) {
    return request({
      url: "/dep/list",
      method: "get",
      params: pagination
    })
  },
  //删除院系
  deleteDepartment(id) {
    return request({
      url: "/dep/delete",
      method: "post",
      params: {id}
    })
  },
  //更新院系
  updateDepartment(data) {
    return request({
      url: "/dep/update",
      method: "post",
      data
    })
  },
  //添加院系
  addDepartment(data) {
    return request({
      url: '/dep/add',
      method: 'post',
      data
    })
  },
  //获取全部院系信息
  getAllList() {
    return request({
      url: '/dep/listAll',
      method: 'get',
    })
  },
  getById(id) {
    return request({
      url: '/dep/selectById',
      method: 'get',
      params: {id}
    })
  }
}
